import type { ILogin, IRespose, INine, IList } from "@/api/type";
import api from "@/api/api"

/**
 * @description: 用户登录
 * @param {ILogin} params 
 * @return {Promise} 
 */
 export const login = (params: ILogin): Promise<any> => {
    return api.post('User/login', params);
}

/**
 * description: 首页banner
 * @returns {Promise}
 */
export const fnGetBanner = () :Promise<IRespose> => {
    return api.post('Index/banner', {});
}

export const fnGetNineList = (params: INine) : Promise<IRespose> => {
    return api.post('Goods/quan99', params);
}

export const fnGetCategory = (): Promise<IRespose> => {
    return api.post('Index/category', {})
}

export const fnGetList = (params: IList): Promise<IRespose> => {
    return api.post('Goods/goods', params)
}

export const fnGetHelpType = (): Promise<IRespose> => {
    return api.post('User/helpType', {})
}

export const fnGetHelpData = (params: any): Promise<IRespose> => {
    return api.post("User/help", params);
};